#pragma once
#ifndef _CR_HTTP_RESPONSE_H_
#define _CR_HTTP_RESPONSE_H_

NS_CR_BEGIN

namespace http
{
	class Response
	{
	public:
		Response() = default;

		template<typename TextType, typename headerType, typename UrlType, typename CookiesType, typename ErrorType>
		Response(const int32_t& p_status_code, TextType&& p_text, headerType&& p_header, UrlType&& p_url, const double& p_elapsed, CookiesType&& p_cookies = Cookies{}, ErrorType&& p_error = Error{})
			: status_code{ p_status_code }
			, text( _STD_FWD(p_text) )
			, header( _STD_FWD(p_header) )
			, url{ _STD_FWD(p_url) }
			, elapsed{ p_elapsed }
			, cookies( _STD_FWD(p_cookies) )
			, error{ _STD_FWD(p_error) }
		{ }

	public:
		int32_t status_code;
		string text;
		Header header;
		Url url;
		double elapsed;
		Cookies cookies;
		Error error;
	};
}

NS_CR_END

#endif
